package cn.huiyunche.base.service.form;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @FileName: cn.huiyunche.base.service.form
 * @Description: 车型油耗价格表单
 * @author: Felix
 * @date: 2017/3/13 下午2:33
 */
public class ScPriceconfOcValidateLogForm {

    private Integer id;

    @NotBlank(message = "车型名称不能为空！")
    @Length(min = 3, max = 100, message = "线路名称 3 到 50个字!")
    private String vehicleClassName;

    @NotNull(message = "请输入车型ID")
    @Min(value = 0, message = "车型id必须大于0")
    private Integer vehicleClassId;

    @NotNull(message = "油箱容积不能为空！")
    private Integer tankVolume;

    @NotBlank(message = "油品名称不能为空！")
    private String oilTypeName;

    @NotNull(message = "标准油耗不能为空！")
    @DecimalMin(value = "0.01",message = "标准油耗必须大于0.01")
    private BigDecimal standardOc;

    @NotNull(message = "请输入生效时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date effectiveDate;

    private String batchId;

    public ScPriceconfOcValidateLogForm setId(Integer id) {
        this.id = id;
        return this;
    }

    public Integer getId() {
        return id;
    }

    public String getVehicleClassName() {
        return vehicleClassName;
    }

    public ScPriceconfOcValidateLogForm setVehicleClassName(String vehicleClassName) {
        this.vehicleClassName = vehicleClassName;
        return this;
    }

    public String getBatchId() {
        return batchId;
    }

    public ScPriceconfOcValidateLogForm setBatchId(String batchId) {
        this.batchId = batchId;
        return this;
    }

    public Integer getVehicleClassId() {
        return vehicleClassId;
    }

    public ScPriceconfOcValidateLogForm setVehicleClassId(Integer vehicleClassId) {
        this.vehicleClassId = vehicleClassId;
        return this;
    }

    public Integer getTankVolume() {
        return tankVolume;
    }

    public ScPriceconfOcValidateLogForm setTankVolume(Integer tankVolume) {
        this.tankVolume = tankVolume;
        return this;
    }

    public String getOilTypeName() {
        return oilTypeName;
    }

    public ScPriceconfOcValidateLogForm setOilTypeName(String oilTypeName) {
        this.oilTypeName = oilTypeName;
        return this;
    }

    public BigDecimal getStandardOc() {
        return standardOc;
    }

    public ScPriceconfOcValidateLogForm setStandardOc(BigDecimal standardOc) {
        this.standardOc = standardOc;
        return this;
    }

    public Date getEffectiveDate() {
        return effectiveDate;
    }

    public ScPriceconfOcValidateLogForm setEffectiveDate(Date effectiveDate) {
        this.effectiveDate = effectiveDate;
        return this;
    }

    @Override
    public String toString() {
        return "ScPriceconfFreightForm{" +

                "id=" + id +
                ", vehicleClassName=" + vehicleClassName +
                ", vehicleClassId=" + vehicleClassId +
                ", tankVolume=" + tankVolume +
                ", oilTypeName=" + oilTypeName +
                ", standardOc=" + standardOc +
                ", effectiveDate=" + effectiveDate +
                '}';
    }
}
